      SUBROUTINE E02AJZ(NP1,XMIN,XMAX,A,IA1,LA,QATM1,AIN,IAINT1,LAINT)
C     MARK 8 RELEASE. NAG COPYRIGHT 1979.
C     MARK 9 REVISED. IER-315 (SEP 1981).
C     MARK 11.5(F77) REVISED. (SEPT 1985.)
C
C     * * * * * * * * * * * * * * * * * * * * * * * * * * * *
C
C     NPL DATA FITTING LIBRARY ROUTINE AUXCIN
C
C     CREATED 1/5/79    UPDATED 23/1/80     RELEASE NO. 00/03
C
C     AUTHORS.. GERALD T ANTHONY, MAURICE G COX, J GEOFFREY HAYES.
C     NATIONAL PHYSICAL LABORATORY
C     TEDDINGTON, MIDDLESEX, ENGLAND.
C
C     * * * * * * * * * * * * * * * * * * * * * * * * * * * *
C
C     INPUT PARAMETERS
C        NP1    = N+1 WHERE N IS DEGREE OF GIVEN POLYNOMIAL
C        XMIN   LOWER LIMIT OF RANGE OF X
C        XMAX   UPPER LIMIT OF RANGE OF X
C        A      COEFFICIENTS A0, A1,...AN OF THE GIVEN POLYNOMIAL
C        IA1       ARE STORED IN ARRAY A IN POSITIONS 1, 1+IA1,...
C                  1+N*IA1, RESPECTIVELY
C        LA     THE DECLARED DIMENSION OF ARRAY A
C        QATM1  THE VALUE OF THE INTEGRATED POLYNOMIAL AT XMIN
C
C     OUTPUT PARAMETERS
C        AIN   THE COEFFICIENTS OF THE INTEGRATED POLYNOMIAL
C        IAINT1    ARE RETURNED IN ARRAY AIN IN POSITIONS
C                  1, 1+IAINT1,...1+NP1*IAINT1
C        LAINT  THE DECLARED DIMENSION OF ARRAY AIN
C
C     INTEGRATE THE SERIES WITH COEFFICIENTS A OF DEGREE N
C     (I.E. NP1 COEFFICIENTS) TO OBTAIN THE SERIES WITH COEFFICIENTS
C     AIN OF DEGREE N + 1.  THE SUM OF THE INTEGRATED SERIES IS
C     QATM1 AT THE LEFT HAND END OF THE INTERVAL OF DEFINITION, XMIN
C
C     .. Scalar Arguments ..
      DOUBLE PRECISION  QATM1, XMAX, XMIN
      INTEGER           IA1, IAINT1, LA, LAINT, NP1
C     .. Array Arguments ..
      DOUBLE PRECISION  A(LA), AIN(LAINT)
C     .. Local Scalars ..
      DOUBLE PRECISION  AR, ARM, ARP, R, SCLFTR, TWO, ZERO
      INTEGER           I, NA, NAINT
C     .. Data statements ..
      DATA              TWO, ZERO/2.0D+0, 0.0D+0/
C     .. Executable Statements ..
      ARP = ZERO
      AR = ARP
      SCLFTR = (XMAX-XMIN)/TWO
      NA = (NP1-1)*IA1 + 1
      NAINT = NP1*IAINT1 + 1
      DO 20 I = 1, NP1
         R = NP1 - I + 1
         ARM = A(NA)
         AIN(NAINT) = SCLFTR*(ARM-ARP)/(TWO*R)
         ARP = AR
         AR = ARM
         NA = NA - IA1
         NAINT = NAINT - IAINT1
   20 CONTINUE
C
C     FORM CONSTANT COEFF SO THAT THE VALUE OF THE INTEGRATED SERIES
C     IS QATM1 AT THE LOWER END OF THE RANGE OF THE INDEP. VARIABLE.
C
      AR = ZERO
      NAINT = NP1*IAINT1 + 1
      DO 40 I = 1, NP1
         AR = AIN(NAINT) - AR
         NAINT = NAINT - IAINT1
   40 CONTINUE
      AIN(1) = TWO*(QATM1+AR)
      RETURN
C     END OF E02AJZ
      END
